<?php
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2019/3/1
 * Time: 9:45
 */

namespace App\Http\Controllers\NewAdmin;

use App\Http\Controllers\AdapterWebController;
use App\Modules\Cargo\Cargo as ApiCargo;

class Cargo extends AdapterWebController
{
    public function index()
    {
        if (empty(\request('keywords'))) {
            $postData['keywords'] = '';
        } else {
            $postData['keywords'] = \request('keywords');
        }
        $cargos = $this->appLayerExec(ApiCargo::class, 'backCargoList', $postData);
        return view('newAdmin.cargo.index', ['cargos' => $cargos['res'], 'keywords' => $postData['keywords']]);
    }
}
